sculpin_df %>%
filter(lake == "Toolik") %>%
summarize(
mean = mean(total_length_mm, na.rm = TRUE),
sd = sd(total_length_mm, na.rm = TRUE),
se = sd(total_length_mm, na.rm = TRUE)/(sum(!is.na(total_length_mm))^0.5),
count = sum(!is.na(total_length_mm)),
.groups = "drop") # A tibble: 1 × 4
mean sd se count
<dbl> <dbl> <dbl> <int>
1 51.7 12.0 0.834 208